﻿using System;

namespace SharpCommon.ORM.Attributes
{
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
    public class ColumnAttribute : Attribute
    {
        private string _name;
        //private bool _isUnique;
        private bool _isNull; 
        private bool _isPrimaryKey;
        //private bool _isInsert = true;
        //private bool _IsUpdate = true;

        public ColumnAttribute(string name)
        {
            this._name = name;
        }

        public string Name
        {
            get { return this._name; }
            set { this._name = value; }
        }

        public bool IsPrimaryKey
        {
            get { return this._isPrimaryKey; }
            set { this._isPrimaryKey = value; }
        }

        //public bool IsUnique
        //{
        //    get { return this._isUnique; }
        //    set { this._isUnique = value; }
        //}

        public bool IsNull
        {
            get { return this._isNull; }
            set { this._isNull = value; }
        }

        //public bool IsInsert
        //{
        //    get { return _isInsert; }
        //    set { _isInsert = value; }}
        //public bool IsUpdate
        //{
        //    get { return _IsUpdate; }
        //    set { _IsUpdate = value; }
        //}
    }
}
